//
//  YXShareManager.m
//  Doctor
//
//  Created by 张良玉 on 17/5/9.
//  Copyright © 2017年 YX. All rights reserved.
//

#import "YXShareManager.h"

@implementation YXShareManager

+ (void)configUMSharePlatforms{
    [[UMSocialManager defaultManager]openLog:YES];
    [[UMSocialManager defaultManager]setUmSocialAppkey:kUMengAppKey];
}

+ (BOOL)handleOpenURL:(NSURL *)url options:(NSDictionary*)options{
    if (options) {
        return [[UMSocialManager defaultManager] handleOpenURL:url options:options];
    }else{
        return [[UMSocialManager defaultManager] handleOpenURL:url];
    }
}

+ (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
    return [[UMSocialManager defaultManager] handleOpenURL:url sourceApplication:sourceApplication annotation:annotation];
}

+ (void)shareCustomUIWithLink:(NSString *)shareLink shareTitleText:(NSString *)shareTitleText shareDescText:(NSString *)shareDescText shareImage:(id )shareImage shareSuccess:(void(^)(YXShareType type))success
{
    [YXSocialSnsService shareSheetWithLink:shareLink shareTitleText:shareTitleText shareDescText:shareTitleText shareImage:shareImage shareSuccess:success];
}

@end
